/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package soatonline.gui;

import java.awt.Color;
import java.awt.MouseInfo;
import java.awt.Point;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import soatonline.VO.Fondo;
import soatonline.VO.TestConnection;

/**
 *
 * @author 406-pc-28
 */
public class FrameRegistro_Cliente extends javax.swing.JFrame {

    TestConnection con = new TestConnection();
    int x, y;

    /**
     * Creates new form Soat
     */
    public FrameRegistro_Cliente() {
        setUndecorated(true);
        initComponents();
        this.ponerfondo("/imagenes/LogoFinal.png");
        this.jCBModelo1.setModel(CargarDatos("select * from vehiculo", "marca"));
        this.jCBCilindraje.setModel(CargarDatos("select * from cilindraje", "cilindraje"));
        jTFOtro.setEnabled(false);
        setLocationRelativeTo(null);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jCBModelo = new javax.swing.JComboBox();
        jLBModelo = new javax.swing.JLabel();
        jLBCiudad = new javax.swing.JLabel();
        jLBIdentificacion = new javax.swing.JLabel();
        jLBTomador = new javax.swing.JLabel();
        jLBTelefono = new javax.swing.JLabel();
        jLBNumero_Chasis = new javax.swing.JLabel();
        jTFApellido = new javax.swing.JTextField();
        jLBSexo = new javax.swing.JLabel();
        jLBServicio = new javax.swing.JLabel();
        jLBVehiculo = new javax.swing.JLabel();
        jBGuardar = new javax.swing.JButton();
        jLBEmail = new javax.swing.JLabel();
        jLBNumero_Documento = new javax.swing.JLabel();
        jLBNumero_Motor = new javax.swing.JLabel();
        jTFCiudad = new javax.swing.JTextField();
        jLBDireccion = new javax.swing.JLabel();
        jTFTelefono = new javax.swing.JTextField();
        jTFCelular = new javax.swing.JTextField();
        jLBCelular = new javax.swing.JLabel();
        jLBPlaca = new javax.swing.JLabel();
        jLBSoatSeguros = new javax.swing.JLabel();
        jTFEmail = new javax.swing.JTextField();
        jCBServicio = new javax.swing.JComboBox();
        jLBMarca = new javax.swing.JLabel();
        jTFNumero_Documento = new javax.swing.JTextField();
        jTFNumero_Chasis = new javax.swing.JTextField();
        jTFDireccion = new javax.swing.JTextField();
        jLBApellido = new javax.swing.JLabel();
        jLBTipo_Vehiculo = new javax.swing.JLabel();
        jTFTipo_Vehiculo = new javax.swing.JTextField();
        jTFNombre = new javax.swing.JTextField();
        jTFCant_Pasajeros = new javax.swing.JTextField();
        jLNombre = new javax.swing.JLabel();
        jTFDepartamento = new javax.swing.JTextField();
        jTFNumero_Motor = new javax.swing.JTextField();
        jLBEtiqueta = new javax.swing.JLabel();
        jLBCantPasajeros = new javax.swing.JLabel();
        jLBCilindraje = new javax.swing.JLabel();
        jLBDepartamento = new javax.swing.JLabel();
        jBSalir = new javax.swing.JButton();
        jTFPlaca = new javax.swing.JTextField();
        jCBSexo = new javax.swing.JComboBox();
        jCBTipo_Identificacion = new javax.swing.JComboBox();
        jTFOtro = new javax.swing.JTextField();
        jTFLinea = new javax.swing.JTextField();
        jLBLinea = new javax.swing.JLabel();
        jCBModelo1 = new javax.swing.JComboBox();
        jLBNombreE = new javax.swing.JLabel();
        jLBPlacaE = new javax.swing.JLabel();
        jLBApellidoE = new javax.swing.JLabel();
        jLBNdocumentoE = new javax.swing.JLabel();
        jLBCelularE = new javax.swing.JLabel();
        jLBTfijoE = new javax.swing.JLabel();
        jLBEmailE = new javax.swing.JLabel();
        jLBDireccionE = new javax.swing.JLabel();
        jLBCiudadE = new javax.swing.JLabel();
        jLBDepartamentoE = new javax.swing.JLabel();
        jLBModeloE = new javax.swing.JLabel();
        jLBMarcaE = new javax.swing.JLabel();
        jLBLineaE = new javax.swing.JLabel();
        jLBTvehiculoE = new javax.swing.JLabel();
        jLBCpasajerosE = new javax.swing.JLabel();
        jLBCilindrajeE = new javax.swing.JLabel();
        jLBNmotorE = new javax.swing.JLabel();
        jLBNChasisE = new javax.swing.JLabel();
        Warning = new javax.swing.JLabel();
        jLBServicioE = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jCBCilindraje = new javax.swing.JComboBox();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                jPanel1MousePressed(evt);
            }
        });
        jPanel1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                jPanel1MouseDragged(evt);
            }
        });

        jCBModelo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- - -", "Antes del 2000", "Despues del 2000", "" }));

        jLBModelo.setText("Modelo");

        jLBCiudad.setText("Ciudad");

        jLBIdentificacion.setText("Tipo identificacion");

        jLBTomador.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLBTomador.setText("TOMADOR");

        jLBTelefono.setText("Telefono Fijo");

        jLBNumero_Chasis.setText("Numero de chasis");

        jLBSexo.setText("Sexo");

        jLBServicio.setText("Servicio");

        jLBVehiculo.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLBVehiculo.setText("VEHICULO");

        jBGuardar.setText("Guardar");
        jBGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBGuardarActionPerformed(evt);
            }
        });

        jLBEmail.setText("Email");

        jLBNumero_Documento.setText("Numero documento");

        jLBNumero_Motor.setText("Numero de motor");

        jLBDireccion.setText("Direccion");

        jLBCelular.setText("Celular");

        jLBPlaca.setText("Placa");

        jLBSoatSeguros.setFont(new java.awt.Font("Franklin Gothic Heavy", 0, 11)); // NOI18N
        jLBSoatSeguros.setText("Soatseguros");

        jCBServicio.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- - -", "Particular ", "Oficiales", "Publico", "Otro" }));
        jCBServicio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBServicioActionPerformed(evt);
            }
        });

        jLBMarca.setText("Marca");

        jLBApellido.setText("Apellido");

        jLBTipo_Vehiculo.setText("Tipo de vehiculo");

        jLNombre.setText("Nombre");

        jLBEtiqueta.setText("Por favor digite la informacion requerida a continuacion.");

        jLBCantPasajeros.setText("Cant. pasajeros");

        jLBCilindraje.setText("Cilindraje");

        jLBDepartamento.setText("Departamento");

        jBSalir.setText("Salir");
        jBSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBSalirActionPerformed(evt);
            }
        });

        jTFPlaca.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFPlacaActionPerformed(evt);
            }
        });

        jCBSexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- - -", "Masculino", "Femenino" }));

        jCBTipo_Identificacion.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- - -", "R.C", "T.I", "C.C", "C.E", "NIT" }));

        jTFOtro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFOtroActionPerformed(evt);
            }
        });

        jLBLinea.setText("Linea");

        jCBModelo1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- - -", "Antes del 2000", "Despues del 2000", "" }));
        jCBModelo1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBModelo1ActionPerformed(evt);
            }
        });

        jTextField1.setText("1");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(40, 40, 40)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLBNumero_Documento)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLBNdocumentoE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLBDireccion)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLBDireccionE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(jTFDireccion)
                                    .addComponent(jTFDepartamento)
                                    .addComponent(jTFEmail)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLBTelefono)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLBTfijoE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLBCelular)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLBCelularE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLBEmail)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLBEmailE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLBCiudad)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLBCiudadE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLNombre)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLBNombreE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLBApellido, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLBApellidoE, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(jTFNombre)
                                    .addComponent(jTFApellido)
                                    .addComponent(jTFNumero_Documento)
                                    .addComponent(jTFTelefono)
                                    .addComponent(jTFCelular)
                                    .addComponent(jTFCiudad)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addComponent(jLBSexo)
                                                .addGap(95, 95, 95))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addComponent(jCBSexo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addGap(26, 26, 26)))
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLBIdentificacion)
                                            .addComponent(jCBTipo_Identificacion, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLBDepartamento)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLBDepartamentoE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(70, 70, 70)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTFOtro)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                .addComponent(jTFPlaca, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGroup(jPanel1Layout.createSequentialGroup()
                                                    .addComponent(jLBPlaca)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLBPlacaE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addGroup(jPanel1Layout.createSequentialGroup()
                                                    .addComponent(jLBNumero_Motor)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLBNmotorE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addGroup(jPanel1Layout.createSequentialGroup()
                                                    .addComponent(jLBNumero_Chasis)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLBNChasisE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addComponent(jTFNumero_Motor, javax.swing.GroupLayout.Alignment.TRAILING)
                                                .addComponent(jCBServicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jTFTipo_Vehiculo)
                                                .addGroup(jPanel1Layout.createSequentialGroup()
                                                    .addComponent(jLBLinea)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLBLineaE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addComponent(jTFLinea)
                                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                        .addComponent(jCBModelo, javax.swing.GroupLayout.Alignment.LEADING, 0, 188, Short.MAX_VALUE)
                                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                                    .addComponent(jLBMarca)
                                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                    .addComponent(jLBMarcaE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                                    .addComponent(jLBModelo)
                                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                    .addComponent(jLBModeloE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                            .addGap(0, 0, Short.MAX_VALUE)))
                                                    .addGap(23, 23, 23))
                                                .addComponent(jTFNumero_Chasis)
                                                .addGroup(jPanel1Layout.createSequentialGroup()
                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addGroup(jPanel1Layout.createSequentialGroup()
                                                            .addComponent(jLBCantPasajeros)
                                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                            .addComponent(jLBCpasajerosE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                                .addComponent(jLBServicio)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                .addComponent(jLBServicioE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                                            .addComponent(jTFCant_Pasajeros, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                    .addGap(30, 30, 30)
                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addGroup(jPanel1Layout.createSequentialGroup()
                                                            .addComponent(jLBCilindraje)
                                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                            .addComponent(jLBCilindrajeE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                        .addComponent(jCBCilindraje, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addComponent(jLBTipo_Vehiculo)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jLBTvehiculoE, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(0, 0, Short.MAX_VALUE))
                                    .addComponent(jCBModelo1, 0, 211, Short.MAX_VALUE)))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLBSoatSeguros, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLBEtiqueta, javax.swing.GroupLayout.PREFERRED_SIZE, 321, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(0, 0, Short.MAX_VALUE)))
                        .addContainerGap(40, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLBTomador)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLBVehiculo)
                        .addGap(63, 63, 63))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(Warning, javax.swing.GroupLayout.PREFERRED_SIZE, 326, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jBGuardar)
                .addGap(37, 37, 37)
                .addComponent(jBSalir)
                .addGap(33, 33, 33))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(jLBSoatSeguros, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLBEtiqueta)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLBTomador)
                    .addComponent(jLBVehiculo))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(Warning, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(4, 4, 4)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLBNombreE, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLBPlaca)
                                    .addComponent(jLNombre)))
                            .addComponent(jLBPlacaE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTFPlaca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTFNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLBModelo)
                                    .addComponent(jLBModeloE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jCBModelo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLBApellido, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLBApellidoE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTFApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLBMarca)
                            .addComponent(jLBSexo)
                            .addComponent(jLBIdentificacion, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jLBMarcaE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jCBModelo1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jCBSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jCBTipo_Identificacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLBLinea)
                            .addComponent(jLBLineaE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTFLinea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLBTipo_Vehiculo)
                            .addComponent(jLBTvehiculoE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(5, 5, 5)
                        .addComponent(jTFTipo_Vehiculo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLBCantPasajeros)
                                .addComponent(jLBCilindraje))
                            .addComponent(jLBCpasajerosE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLBCilindrajeE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTFCant_Pasajeros, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jCBCilindraje, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLBServicio)
                            .addComponent(jLBServicioE, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jCBServicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jTFOtro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLBNumero_Motor, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(jLBNmotorE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addComponent(jTFNumero_Motor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(11, 11, 11)
                                .addComponent(jLBNumero_Chasis))
                            .addComponent(jLBNChasisE, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTFNumero_Chasis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLBNumero_Documento)
                            .addComponent(jLBNdocumentoE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTFNumero_Documento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLBTelefono)
                            .addComponent(jLBTfijoE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTFTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(8, 8, 8)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLBCelular)
                            .addComponent(jLBCelularE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTFCelular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLBEmail)
                            .addComponent(jLBEmailE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTFEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLBDireccion)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTFDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLBCiudad)
                                    .addComponent(jLBCiudadE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTFCiudad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLBDepartamento, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jTFDepartamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(jLBDepartamentoE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(jLBDireccionE, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBGuardar)
                    .addComponent(jBSalir))
                .addGap(22, 22, 22))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    private boolean verificarUsuario(String nombre) {
        try {
            ResultSet res = con.Consulta("Select Numero_identificacion from cliente");
            while (res.next()) {
                if (res.getObject("Numero_identificacion").equals(nombre)) {
                    return false;
                }

            }
            con.cerrar();
            return true;
        } catch (SQLException ex) {

            Logger.getLogger(FrameRegistro_Cliente.class.getName()).log(Level.SEVERE, null, ex);
            return false;
        }
    }

    private DefaultComboBoxModel CargarDatos(String consulta, String campo) {
        try {
            DefaultComboBoxModel combo = new DefaultComboBoxModel();
            con = new TestConnection();
            try (ResultSet res = con.Consulta(consulta)) {
                while (res.next()) {
                    combo.addElement(res.getObject(campo));
                }
            }
            con.cerrar();
            return combo;
        } catch (SQLException ex) {
            Logger.getLogger(FrameDatosAdministrador.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(null, ex);
            return null;

        }

    }

    private boolean verificar(JTextField jt) {

        String campo = jt.getText();
        String replaceAll = campo.replaceAll(" +", " ");
        campo = campo.trim();
        if (campo.length() == 0) {
            return false;
        }
        return true;

    }

    private void InformacionCampos(java.awt.event.ActionEvent e) {
        if (this.jTFNombre.getText().equals("") || this.jTFApellido.getText().equals("") || this.jCBSexo.getSelectedItem().equals("- - -")
                || this.jCBTipo_Identificacion.getSelectedItem().equals("- - -") || this.jTFNumero_Documento.getText().equals("")
                || this.jTFTelefono.getText().equals("") || this.jTFCelular.getText().equals("") || this.jTFEmail.getText().equals("")
                || this.jTFDireccion.getText().equals("") || this.jTFCiudad.getText().equals("") || this.jTFDepartamento.getText().equals("")
                || this.jTFPlaca.getText().equals("") || this.jCBModelo.getSelectedItem().equals("") || this.jCBModelo1.getSelectedItem().equals("") || this.jTFLinea.getText().equals("")
                || this.jTFTipo_Vehiculo.getText().equals("") || this.jTFCant_Pasajeros.getText().equals("") || this.jCBCilindraje.getSelectedItem().equals("") || this.jCBServicio.getSelectedItem().equals("")
                || this.jTFNumero_Motor.getText().equals("") || this.jTFNumero_Chasis.getText().equals("")) {
            this.Warning.setText("Los campos marcados son obligatorios *");
            this.Warning.setForeground(new Color(255, 0, 0));

        }
        if (this.jTFNombre.getText().equals("")) {
            this.jLBNombreE.setText("*");
            this.jLBNombreE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFApellido.getText().equals("")) {
            this.jLBApellidoE.setText("*");
            this.jLBApellidoE.setForeground(new Color(255, 0, 0));
        }

        if (this.jTFNumero_Documento.getText().equals("")) {
            this.jLBNdocumentoE.setText("*");
            this.jLBNdocumentoE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFTelefono.getText().equals("")) {
            this.jLBTfijoE.setText("*");
            this.jLBTfijoE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFCelular.getText().equals("")) {
            this.jLBCelularE.setText("*");
            this.jLBCelularE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFEmail.getText().equals("")) {
            this.jLBEmailE.setText("*");
            this.jLBEmailE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFDireccion.getText().equals("")) {
            this.jLBDireccionE.setText("*");
            this.jLBDireccionE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFCiudad.getText().equals("")) {
            this.jLBCiudadE.setText("*");
            this.jLBCiudadE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFDepartamento.getText().equals("")) {
            this.jLBDepartamentoE.setText("*");
            this.jLBDepartamentoE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFPlaca.getText().equals("")) {
            this.jLBPlacaE.setText("*");
            this.jLBPlacaE.setForeground(new Color(255, 0, 0));
        }
        if (this.jCBModelo.getSelectedItem().equals("- - -")) {
            this.jLBModeloE.setText("*");
            this.jLBModeloE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFLinea.getText().equals("")) {
            this.jLBLineaE.setText("*");
            this.jLBLineaE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFTipo_Vehiculo.getText().equals("")) {
            this.jLBTvehiculoE.setText("*");
            this.jLBTvehiculoE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFCant_Pasajeros.getText().equals("")) {
            this.jLBCpasajerosE.setText("*");
            this.jLBCpasajerosE.setForeground(new Color(255, 0, 0));
        }
        if (this.jCBCilindraje.getSelectedItem().equals(" ")) {
            this.jLBCilindrajeE.setText("*");
            this.jLBCilindrajeE.setForeground(new Color(255, 0, 0));
        }
        if (this.jCBServicio.getSelectedItem().equals("- - -")) {
            this.jLBServicioE.setText("*");
            this.jLBMarcaE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFNumero_Motor.getText().equals("")) {
            this.jLBNmotorE.setText("*");
            this.jLBNmotorE.setForeground(new Color(255, 0, 0));
        }
        if (this.jTFNumero_Chasis.getText().equals("")) {
            this.jLBNChasisE.setText("*");
            this.jLBNChasisE.setForeground(new Color(255, 0, 0));
        }

    }

    public void ponerfondo(String url) {
        this.jPanel1.add(new Fondo(this.getSize(), url));
        repaint();
    }
    private void jTFPlacaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFPlacaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTFPlacaActionPerformed

    private void jPanel1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel1MousePressed
        x = evt.getX();
        y = evt.getY();
    }//GEN-LAST:event_jPanel1MousePressed

    private void jPanel1MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel1MouseDragged
        Point point = MouseInfo.getPointerInfo().getLocation();
        setLocation(point.x - x, point.y - y);
    }//GEN-LAST:event_jPanel1MouseDragged

    private void jCBServicioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBServicioActionPerformed
        Object a = jCBServicio.getSelectedItem();
        //System.out.println(a);
        if (a.equals("Otro")) {
            jTFOtro.setEnabled(true);
            jTFOtro.requestFocus();
        } else {
            jTFOtro.setText("");
            jTFOtro.setEnabled(false);
        }


    }//GEN-LAST:event_jCBServicioActionPerformed

    private void jBSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBSalirActionPerformed
        new FrameActividad().setVisible(true);
        this.dispose();
    }//GEN-LAST:event_jBSalirActionPerformed

    private void jBGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBGuardarActionPerformed

        String a = "insert into cliente values ('" + jTFNombre.getText() + "','" + jTFApellido.getText() + "','" + jCBSexo.getSelectedItem()
                + "','" + jCBTipo_Identificacion.getSelectedItem() + "','" + jTFNumero_Documento.getText() + "','" + jTFTelefono.getText() + "','" + jTFCelular.getText()
                + "','" + jTFEmail.getText() + "','" + jTFDireccion.getText() + "','" + jTFCiudad.getText() + "','" + jTFDepartamento.getText() + "')";

        String b = "insert into informacion_vehiculo values ('" + jTextField1.getText() + "','" + jTFPlaca.getText() + "','" + jCBModelo.getSelectedItem() + "','" + jCBModelo1.getSelectedItem() + "','"
                + jTFLinea.getText() + "','" + jTFTipo_Vehiculo.getText() + "','" + jTFCant_Pasajeros.getText() + "','" + jCBCilindraje.getSelectedItem() + "','" + jCBServicio.getSelectedItem() + "','" + jTFOtro.getText()
                + "','" + jTFNumero_Motor.getText() + "','" + jTFNumero_Chasis.getText() + "')";

        try {
            if (verificar(jTFNombre) && verificar(jTFApellido) && verificar(jTFNumero_Documento) && verificar(jTFTelefono)
                    && verificar(jTFCelular) && verificar(jTFEmail) && verificar(jTFDireccion) && verificar(jTFCiudad) && verificar(jTFDepartamento)
                    && verificar(jTFPlaca) && verificar(jTFLinea) && verificar(jTFTipo_Vehiculo) && verificar(jTFCant_Pasajeros)
                    && verificar(jTFNumero_Motor) && verificar(jTFNumero_Chasis)) {
                if (!verificarUsuario(jTFNombre.getText())) {
                    con.update(a);
                    con.cerrar();
                    con.update(b);
                    
                    
                } else {
                    JOptionPane.showMessageDialog(rootPane, "Ya existe un Usuario con un mismo Numero de Documento");
                    jTFNumero_Documento.setText("");
                    jTFNumero_Documento.requestFocus();
                }
                con.cerrar();
            } else {
                InformacionCampos(evt);
            }
            
        } catch (SQLException ex) {
            Logger.getLogger(FrameRegistro_Cliente.class.getName()).log(Level.SEVERE, null, ex);
        }


    }//GEN-LAST:event_jBGuardarActionPerformed

    private void jTFOtroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFOtroActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTFOtroActionPerformed

    private void jCBModelo1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBModelo1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCBModelo1ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrameRegistro_Cliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrameRegistro_Cliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrameRegistro_Cliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrameRegistro_Cliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FrameRegistro_Cliente().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel Warning;
    private javax.swing.JButton jBGuardar;
    private javax.swing.JButton jBSalir;
    private javax.swing.JComboBox jCBCilindraje;
    private javax.swing.JComboBox jCBModelo;
    private javax.swing.JComboBox jCBModelo1;
    private javax.swing.JComboBox jCBServicio;
    private javax.swing.JComboBox jCBSexo;
    private javax.swing.JComboBox jCBTipo_Identificacion;
    private javax.swing.JLabel jLBApellido;
    private javax.swing.JLabel jLBApellidoE;
    private javax.swing.JLabel jLBCantPasajeros;
    private javax.swing.JLabel jLBCelular;
    private javax.swing.JLabel jLBCelularE;
    private javax.swing.JLabel jLBCilindraje;
    private javax.swing.JLabel jLBCilindrajeE;
    private javax.swing.JLabel jLBCiudad;
    private javax.swing.JLabel jLBCiudadE;
    private javax.swing.JLabel jLBCpasajerosE;
    private javax.swing.JLabel jLBDepartamento;
    private javax.swing.JLabel jLBDepartamentoE;
    private javax.swing.JLabel jLBDireccion;
    private javax.swing.JLabel jLBDireccionE;
    private javax.swing.JLabel jLBEmail;
    private javax.swing.JLabel jLBEmailE;
    private javax.swing.JLabel jLBEtiqueta;
    private javax.swing.JLabel jLBIdentificacion;
    private javax.swing.JLabel jLBLinea;
    private javax.swing.JLabel jLBLineaE;
    private javax.swing.JLabel jLBMarca;
    private javax.swing.JLabel jLBMarcaE;
    private javax.swing.JLabel jLBModelo;
    private javax.swing.JLabel jLBModeloE;
    private javax.swing.JLabel jLBNChasisE;
    private javax.swing.JLabel jLBNdocumentoE;
    private javax.swing.JLabel jLBNmotorE;
    private javax.swing.JLabel jLBNombreE;
    private javax.swing.JLabel jLBNumero_Chasis;
    private javax.swing.JLabel jLBNumero_Documento;
    private javax.swing.JLabel jLBNumero_Motor;
    private javax.swing.JLabel jLBPlaca;
    private javax.swing.JLabel jLBPlacaE;
    private javax.swing.JLabel jLBServicio;
    private javax.swing.JLabel jLBServicioE;
    private javax.swing.JLabel jLBSexo;
    private javax.swing.JLabel jLBSoatSeguros;
    private javax.swing.JLabel jLBTelefono;
    private javax.swing.JLabel jLBTfijoE;
    private javax.swing.JLabel jLBTipo_Vehiculo;
    private javax.swing.JLabel jLBTomador;
    private javax.swing.JLabel jLBTvehiculoE;
    private javax.swing.JLabel jLBVehiculo;
    private javax.swing.JLabel jLNombre;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JTextField jTFApellido;
    private javax.swing.JTextField jTFCant_Pasajeros;
    private javax.swing.JTextField jTFCelular;
    private javax.swing.JTextField jTFCiudad;
    private javax.swing.JTextField jTFDepartamento;
    private javax.swing.JTextField jTFDireccion;
    private javax.swing.JTextField jTFEmail;
    private javax.swing.JTextField jTFLinea;
    private javax.swing.JTextField jTFNombre;
    private javax.swing.JTextField jTFNumero_Chasis;
    private javax.swing.JTextField jTFNumero_Documento;
    private javax.swing.JTextField jTFNumero_Motor;
    private javax.swing.JTextField jTFOtro;
    private javax.swing.JTextField jTFPlaca;
    private javax.swing.JTextField jTFTelefono;
    private javax.swing.JTextField jTFTipo_Vehiculo;
    private javax.swing.JTextField jTextField1;
    // End of variables declaration//GEN-END:variables
}
